<template>
	<view class="login_container">
		<!-- 登录注册组件 -->
		<view class="login_card">
			<LoginCard @toRegister="toRegister" @toLogin="toLogin" :action="action" :isSelectRadio="isSelectRadio">
			</LoginCard>
		</view>
		<view class="bottom_card">
			<radio-group color="#fa9c96" @change="radioChange">
				<view>
					<radio value="1" />
				</view>
			</radio-group>
			<p>点击阅读并同意<span class="active_bottom">《业务开展协议》</span>和<span class="active_bottom">《隐私协议》</span></p>
		</view>
	</view>
</template>
<script>
	import LoginCard from '@/components/user/LoginCard.vue'
	export default {
		components: {
			LoginCard
		},
		mounted() {},
		data() {
			return {
				action: 'login',
				isSelectRadio: false,
			}
		},
		methods: {
			radioChange(v) {
				if (v.detail.value == "1") {
					this.isSelectRadio = true
				}
			},
			toRegister() {
				this.action = "register"
				uni.setNavigationBarTitle({
					title: '注册'
				})
			},
			toLogin() {
				this.action = "login"
				uni.setNavigationBarTitle({
					title: '登录'
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.login_container {
		width: 100%;
		height: 100vh;
		background-color: #fff;
		background-image: url('https://yueshibaohe.com:443/crmebimage/public/maintain/2024/11/06/ae071427443445e88884fb1ad1242e2duxbd6bnf1y.png');
		background-repeat: no-repeat;
		background-size: contain;
		position: relative;

		.login_card {
			width: 100%;
			position: absolute;
			top: 41%;
			padding: 20rpx 60rpx;
		}

		.bottom_card {
			width: 100%;
			display: flex;
			justify-content: center;
			position: absolute;
			bottom: 50rpx;

			.active_bottom {
				color: #fa9c96;
			}
		}
	}
</style>